package com.guigu.www.denghao.controller;

import com.guigu.www.denghao.service.DHCountMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/DHCountMemberController")
public class DHCountMemberController {

    @Autowired
    private DHCountMemberService countMemberService;

    @PostMapping("/queryMemberCount")
    public Integer[] queryMemberCount(String[] dates){
        return countMemberService.queryMemberCount(dates);
    }

    @PostMapping("/queryHealthCount")
    public Integer[] queryHealthCount(String[] dates){
        return countMemberService.queryHealthCount(dates);
    }

    @PostMapping("/querySaleMoney")
    public Integer[] querySaleMoney(String[] dates){
        return countMemberService.querySaleMoney(dates);
    }

    @PostMapping("/queryTotalAndAdd")
    public Map<String,String> queryTotalAndAdd(){
        return countMemberService.queryTotalAndAdd();
    }

    @PostMapping("/indexDetails")
    public Map<String,String> indexDetails(){
        return countMemberService.indexDetails();
    }

    @PostMapping("/querySetMealSale")
    public Map<String,String> querySetMealSale(){
        return countMemberService.querySetMealSale();
    }


    @PostMapping("/queryIntervention")
    public Map<String,Integer[]> queryIntervention(String[] dates,Integer hmId){
        return countMemberService.queryIntervention(dates,hmId);
    }

    @PostMapping("/queryReturnCount")
    public Map<String,Integer[]> queryReturnCount(String[] dates,Integer hmId){
        return countMemberService.queryReturnCount(dates,hmId);
    }

    @PostMapping("/queryInterventionInfo")
    public Map<String,Integer> queryInterventionInfo(Integer hmId,String jin,String zuo){
        return countMemberService.queryInterventionInfo(hmId,jin,zuo);
    }


}
